<template>
	<view class="body">
		<u-collapse>
			<u-collapse-item :title="item.title" v-for="(item, index) in liveUrls" :key="index">
				<u-cell-group>
					<u-cell-item v-for="(ite,idx) in item.urlList" @click="navto(ite.title,ite.intro,ite.url)" icon="play-circle" title="">{{ite.title}}</u-cell-item>
				</u-cell-group>
			</u-collapse-item>
		</u-collapse>
	</view>
</template>

<script>
	import {
		liveUrls
	} from "../../utils/api.js"
	export default {
		data() {
			return {
				liveUrls: liveUrls,
			}
		},
		onLoad() {
			console.log(liveUrls)
		},
		methods: {
			navto(title,intro,url) {
				console.log(url)
				uni.navigateTo({
					url: '/pages/play/play?title='+ title+'&intro=' + intro+'&url=' + url
				})
			}
		}
	}
</script>

<style>
	.body {
		width: 100%;
		padding: 10rpx 20rpx;
		/* display: flex;
		flex-direction: column;
		align-items: center; */
	}

	.inputStyle {
		margin-top: 50rpx;
		background-color: white;
		border-radius: 50rpx;
		width: 700rpx;
		height: 90rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;
	}

	.btn-box {
		margin-top: 30rpx;
		margin-bottom: 30rpx;
	}

	.explain {
		font-size: 35rpx;
		color: #333333;
		font-weight: 500;
		margin-top: 50rpx;
	}

	.explain_info {
		font-size: 28rpx;
		color: #333333;
		padding: 30rpx;
		line-height: 40rpx;
	}

	.list {
		width: 100%;
		display: flex;
		flex-flow: row;
		flex-direction: row;
	}

	.list-item {
		width: 33.3333%;
		text-align: center;
		height: 60rpx;
		line-height: 60rpx;
	}
</style>